package com.easyto.order.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope
public class OrderTestController {

    /**
     * 共享配置文件名称
     */
    @Value("${easyto.text}")
    private String shareName;

    /**
     * 项目配置文件名称
     */
    @Value("${easytoOrder.text}")
    private String orderName;

    @GetMapping("/test")
    public String getTest() {
        System.out.println(" >>>>>>>>>>> print order test");
        return "200";
    }


    @GetMapping("/share/getValue")
    public String getShareValue() {

        return shareName;
    }

    @GetMapping("/getValue")
    public String getValue() {

        return orderName;
    }
}
